package com.card.game.playback;

import java.util.List;

import com.card.game.Card;
import com.card.game.CardHeap;
import com.card.game.Player;
import com.card.game.event.EventType;
import com.google.common.collect.Lists;

/**   
 * @Description: TODO(用一句话描述该文件做什么) 
 * @author siyunlong  
 * @date 2016年9月5日 下午1:44:25 
 * @version V1.0   
 */
public class BackEvent {
	int i;
	EventType t;
	List<Card> hand;//手里的牌
	List<Card> dui;//对牌
	List<Card> gang;//杠牌
	List<Card> outs;//出的牌
	List<Card> huapaiList;//花牌
//	List<Card> tingList;//停牌列表
	List<CardHeap> chis;
	Card card;//当前牌打出的牌或者起的牌或者碰杠的牌
	
	public BackEvent(Player player,EventType t,Card card) {
		this.t = t;
		if(player != null) {
			this.i = player.getTableIndex();
			this.hand = Lists.newArrayList(player.getHand().cards);
			this.dui = Lists.newArrayList(player.getDuiCardsList());
			this.gang = Lists.newArrayList(player.getAllGangList());
			this.outs = Lists.newArrayList(player.getOutCards());
			this.chis = Lists.newArrayList(player.getChiList());
			this.huapaiList = Lists.newArrayList(player.getHuaPaiList());
//			this.tingList = Lists.newArrayList(player.getShowTingCards());
		}
		if(card != null) {
			this.card = card;
		}
	}

	public BackEvent() {
	}
	
}
